<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<{$Charset}>">
<link rel="stylesheet" type="text/css" href="css/main.css">
<script language="javascript" src="<{$JS_PATH}>js/prototype.js"></script>
<script language="javascript" src="<{$JS_PATH}>js/popcalendar.js"></script>
<script language="javascript" src="<{$JS_PATH}>js/general.js"></script>
<script language="javascript" src="<{$JS_PATH}>js/admin.js"></script>
<script language="JavaScript">
function hideorshow(Div1,Div2){
$(Div1).style.display = 'block';
$(Div2).style.display = 'none';
}
</script>
</head>

<body leftmargin="10" topmargin="10">
<table width="100%" border="0" cellpadding="2" cellspacing="6"><tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="guide"><tr>
  <td><div align="left"><a href="#" onClick="parent.main.location='home.php';return false;">控制台</a>&nbsp;&raquo;&nbsp;广告编辑</div></td>
</tr></table>
<form name="editfrm" method="post" enctype="multipart/form-data" action="<{$smarty.server.PHP_SELF}>">
<input type="hidden" name="id" value="<{$smarty.get.id}>" />
<input type="hidden" name="member[id]" value="<{$a.member_id}>" />
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
<tr class="header">
  <td colspan="5">网站广告</td>
</tr>

<tr>
  <td class="altbg1" width="24%"><strong>会员名:</strong></td>
  <td colspan="4" class="altbg2"><input name="member[username]" type="text" id="member_username" value="<{$smarty.get.username}>"></td>
</tr>

<tr>
  <td class="altbg1"><strong>广告标题:</strong></td>
  <td colspan="4" class="altbg2"><input type="text" name="ad[title]" value="<{$a.title}>"></td>
</tr>

<tr>
  <td class="altbg1"><strong>广告描述</strong>:</td>
  <td colspan="4" class="altbg2"><textarea name="ad[description]" rows="6" cols="25"><{$a.description}></textarea></td>
</tr>

<tr>
  <td class="altbg1"><strong>广告容器名称 :</strong></td>
  <td colspan="4" class="altbg2"><select name="ad[adzone_id]" id="ad_adzone_id">
    <{foreach from=$Adzones item=z name=sel_adzone}>
    <option value="<{$z.id}>" <{if $z.id==$a.adzone_id}>selected<{/if}>>
      <{$z.name}>
    <{foreachelse}>
    <option value="0">请补充广告位置
      <{/foreach}>
    </select></td>
</tr>
<tr>
<td class="altbg1"><strong>关键词 :</strong></td>
<td colspan="4" class="altbg2"><input type="text" name="ad[keywords]" value="<{$a.keywords}>"></td>
</tr>

<tr>
<td class="altbg1"><strong>文件名称 :</strong></td>
<td colspan="4" class="altbg2"><input name="ad[source_name]" type="text" id="ad[source_name]" value="<{$a.source_name}>"></td>
</tr>
<tr>
  <td class="altbg1"><strong>优先显示：</strong></td>
  <td colspan="4" class="altbg2"><select name="ad[priority]" id="AdPriority">
	<option value="1">1</option>
	<option value="2">2</option>
	<option value="3">3</option>
	<option value="4">4</option>
	<option value="5">5</option>
  </select></td>
</tr>
<tr>
  <td class="altbg1"><strong>媒体类型：</strong></td>
  <td colspan="4" class="altbg2"><{html_radios name="ad[source_type]" options=$AdTypes checked=$a.source_type|default:"1" separator=" "}></td>
</tr>
<tr>
  <td class="altbg1"><strong>链接方式：</strong></td>
  <td colspan="4" class="altbg2"><input type="radio" name="m_sourcetype" value="1" checked onclick="javascript:hideorshow('m_source_upload','m_source_addr');" />本地上传<input type="radio" name="m_sourcetype" value="2" onClick="hideorshow('m_source_addr','m_source_upload');" />远程链接</td>
</tr>
<tbody id="m_source_addr" style="display:none">
<tr>
  <td class="altbg1"><strong>远程地址：</strong></td>
  <td colspan="4" class="altbg2"><input type="text" size="35" name="ad[source_url]" value="<{$a.source_url}>"></td>
</tr>
</tbody>
<tbody id="m_source_upload" style="display:block">
<tr>
  <td class="altbg1"><strong>附件上传：</strong></td>
  <td colspan="4" class="altbg2"><input type="file" name="pic"></td>
</tr>
</tbody>
<tr>
  <td class="altbg1"><strong>指向地址：</strong> </td>
  <td colspan="4" class="altbg2"><input type="text" name="ad[target_url]" value="<{$a.target_url}>"></td>
</tr>
<tr>
  <td class="altbg1"><strong>打开窗口类型：</strong></td>
  <td colspan="4" class="altbg2"><select name="ad[da]" id="ad_da">
    <{foreach from=$AdsPopTargets item=da name=sel_adda}>
    <option value="<{$da}>"><{$da}>
      <{/foreach}>
    </select></td>
</tr>
<tr>
  <td class="altbg1"><strong>提示词语 :</strong></td>
  <td colspan="4" class="altbg2"><input type="text" name="ad[alt_words]" value="<{$a.alt_words}>"></td>
</tr>
<tr>
  <td class="altbg1"><strong>起止时间</strong></td>
  <td width="20%" align="left" class="altbg2"><input type="text" name="ServiceFromDate" size="10" value='<{$a.start_date|date_format:"%Y-%m-%d"|default:"None"}>' id="date1" readonly>
<a href="javascript:;" onclick='showCalendar(this, $("date1"), "yyyy-mmmm-dd",null,0,-1,-1)'><img src="<{$tpl_img_path}>calendar.gif" border="0" alt=""></a></td>
  <td width="8%" class="altbg2"><div align="center">到</div></td>
  <td width="24%" align="left" class="altbg2"><input type="text" name="ServiceEndDate" size="10" value='<{$a.end_date|date_format:"%Y-%m-%d"|default:"None"}>' id="date2" readonly>
<a href="javascript:;" onclick='showCalendar(this, $("date2"), "yyyy-mmmm-dd",null,0,-1,-1)'><img src="<{$tpl_img_path}>calendar.gif" border="0" alt=""></a></td>
  <td width="24%" align="left" class="altbg2">(默认为今天起一个月)</td>
</tr>


<tr>
  <td class="altbg1"><strong>是否上架：</strong>
  <br />
  （会员自定义）  </td>
  <td colspan="4" class="altbg2"><{html_radios name="ad[dc]" options=$AdsStatus checked=$a.dc|default:"1" separator=" "}></td>
</tr>
<tr>
  <td class="altbg1"><strong>是否有效</strong></td>
  <td colspan="4" class="altbg2"><{html_radios name="ad[status]" options=$AdsStatus checked=$a.status|default:"1" separator=" "}></td>
</tr>



<tr><td colspan="5" class="altbg1"><div align="center">
  <input type="submit" name="save" value="保存" class="btn_mouseout" onMouseOver="this.className='btn_mouseover'" onMouseOut="this.className='btn_mouseout'"/>
</div></td>
</tr>
</table>
<br />
<center>
</center>
</form>
</td></tr></table>
<br /><br />
</body>
</html>

